package com.ts.enterprise.enums;

public enum AppUserStatus {
    USER_NOT_REGIST(1, "用户无身份"),
    USER_NOT_AUTHED(2, "用户未认证"),
    USER_AUTHED(3, "用户已认证");
    private Integer code;
    private String message;
    AppUserStatus(int code, String message) {
        this.code = code;
        this.message = message;
    }
    public static AppUserStatus getCode(int code) {
        AppUserStatus[] auss = AppUserStatus.values();
        for (AppUserStatus aus : auss) {
            if (aus.getCode() == code) {
                return aus;
            }
        }
        return null;
    }

    public int getCode() {
        return code;
    }

    public String getMessage() {
        return message;
    }
}
